{% extends "base.html" %}

{% block page_content %}
<div class="page-header">
    <div class="index1" style="height: 130px;margin-bottom: 10px;">
        <h1>停车记录</h1>
        <form method="post" novalidate>
            {{form.hidden_tag()}}
            {{form.parkingID.label}}{{form.parkingID}}
            {{form.submit()}}
            <label >输入为空时查询全部</label>
        </form>
    </div>
    <table class="hovertable">
        <tr style="font-size: 20px">
            <td width="150">车牌号</td>
            <td width="275">入场时间</td>
            <td width="275">出场时间</td>
            <td width="60">总时间</td>
            <td width="100">办卡</td>
            <td width="100">费用</td>
            <td width="100">车位号</td>
        </tr>

        {% for car in carlist %}
        <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';" style="font-size: 20px">
            <td>{{car['CarID']}}</td>
            <td>{{car['StartTime']}}</td>
            <td>{{car['EndTime']}}</td>
            <td>{{car['TotalTime']}}</td>
            {% if car['AnyCard'] == 0%}
            <td>未办卡</td>
            {% endif %}
            {% if car['AnyCard'] == 1%}
            <td>月卡</td>
            {% endif %}
            {% if car['AnyCard'] == 2%}
            <td>年卡</td>
            {% endif %}
            <td>{{car['Fee']}}</td>
            <td>{{car['ParkingID']}}</td>
        </tr>
        {% endfor %}

    </table>
</div>
{% endblock %}